<template>
  <div class="app-container">
    <template v-for="(item, index) in marketTrendData">
      <el-card style="margin-top:10px">
        <div :id="item.id" style="width: 100%;height: 300px"></div>
      </el-card>
    </template>
  </div>
</template>

<script>
import {renderLineChart} from '@/api/eye/lineChart'
import {getMarketTrendData} from '@/api/eye/stockUpStatistics'

export default {
  name: 'MarketTrend',
  data() {
    return {
      // 大盘趋势数据
      marketTrendData: []
    }
  },
  mounted() {
    getMarketTrendData().then(res => {
      this.marketTrendData = res.data
      console.log(this.marketTrendData)
      this.$nextTick(() => {
        this.marketTrendData.forEach(item => {
          renderLineChart(item)
        })
      })
    })
  },
  created() {
  },
  methods: {}
}
</script>

<style scoped>
</style>
